Be more careful about initializing cell_area. (#319382, Tommi Komulainen)
authorMatthias Clasen <mclasen@redhat.com>
Thu, 27 Oct 2005 04:51:25 +0000 (04:51 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Thu, 27 Oct 2005 04:51:25 +0000 (04:51 +0000)
2005-10-27  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtktreeview.c (gtk_tree_view_button_press): Be more
careful about initializing cell_area.  (#319382, Tommi
Komulainen)

ChangeLog
ChangeLog.pre-2-10
gtk/gtktreeview.c

index 090bd349bf1b81930ef93d87f12b2d1593964cd7..2c170f7667876b9640a046a68aa7453212b48b28 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2005-10-27  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtktreeview.c (gtk_tree_view_button_press): Be more 
+       careful about initializing cell_area.  (#319382, Tommi
+       Komulainen)
+
        * gtk/gtkcombobox.c (gtk_combo_box_key_press): Don't eat
        Ctrl-PageUp/PageDown.  (#318670, Christian Neumair)
 
index 090bd349bf1b81930ef93d87f12b2d1593964cd7..2c170f7667876b9640a046a68aa7453212b48b28 100644 (file)
@@ -1,5 +1,9 @@
 2005-10-27  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtktreeview.c (gtk_tree_view_button_press): Be more 
+       careful about initializing cell_area.  (#319382, Tommi
+       Komulainen)
+
        * gtk/gtkcombobox.c (gtk_combo_box_key_press): Don't eat
        Ctrl-PageUp/PageDown.  (#318670, Christian Neumair)
 
index b4460d9452ff5b92cb72e5695758b6e95b025cfd..8bc500b5cb837b69a9a22d7cc0f9ced53b67d4cb 100644 (file)
@@ -2258,12 +2258,12 @@ gtk_tree_view_button_press (GtkWidget      *widget,
       for (list = (rtl ? g_list_last (tree_view->priv->columns) : g_list_first (tree_view->priv->columns));
           list; list = (rtl ? list->prev : list->next))
        {
-         column = list->data;
+         GtkTreeViewColumn *candidate = list->data;
 
-         if (!column->visible)
+         if (!candidate->visible)
            continue;
 
-         background_area.width = column->width;
+         background_area.width = candidate->width;
          if ((background_area.x > (gint) event->x) ||
              (background_area.x + background_area.width <= (gint) event->x))
            {
@@ -2272,6 +2272,7 @@ gtk_tree_view_button_press (GtkWidget      *widget,
            }
 
          /* we found the focus column */
+         column = candidate;
          cell_area = background_area;
          cell_area.width -= horizontal_separator;
          cell_area.height -= vertical_separator;